perm filename MSYSOL.PUB[HAL,HE]1 blob sn#127021 filedate 1974-10-29 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	.NEWSEC (GENERAL SYSTEM OUTLINE,HARDWARE)
C00012 ENDMK
C⊗;
.NEWSEC (GENERAL SYSTEM OUTLINE,HARDWARE)

.NEWSS HARDWARE

	Currently  two  Stanford  Electric  Arms,   built  by  Victor
Scheinman [Scheinman], are available.  They are called YELLOW and BLUE.  Each has
six joints  and a hand  which can  open and  close.   The joints  are
controlled by  electrical motors; there  is feedback of  position and
velocity  for each joint.  The motor  drives are computed and sent to
the arm via a  digital-to-analog converter; the feedback  signals are
routed through an analog-to-digital converter back to the computer.

	There are two computer-controlled cameras. The 
computer can control the pan, tilt, focus, iris, filter, and zoom
(or lens turret) on each camera.

	Various others devices are designed and implemented as needed.
We use tools, jigs and special markings for several purposes:
to render a task possible (an example is the arm itself), to improve
efficiency (the mechanical screwdriver), and to overcome some of our
sensory and mechanical limitations (the screw dispenser).
Currently there is an electrically powered screwdriver, a pneumatic
vise, and an electrically controlled turntable.  The screwdriver can
be picked up by an arm and can operate in either direction over a range
of speeds.  The vise can be opened or closed and soon there will be
a way to servo it to a specified opening.  The computer can position
the turntable at any rotation (plus or minus .5 degrees).  As such
devices are built, they are interfaced to the A-to-D, the servo is
told how to control them, and the language is extended to include syntax
to describe how to use them.

	HAL  resides on two  computers: The PDP-10  for all planning,
and a PDP-11 for the execution of the plans.  The former is run  as a
timesharing computer  (under a  modified DEC  system); the  latter is
operated  in a  stand-alone mode under  the HAL  runtime system. Each
computer is capable of generating an interrupt in the  other, and the
PDP-10 has complete control over the PDP-11 console and unibus.


.NEWSS	SOFTWARE

	See {NEWFIG Overall system, FULL, sis←} for a picture of
the system.

	The SUPERVISOR  is the top level  of the system.   It runs on
the PDP-10 and provides an interface  between the user and the  other
parts  of  the  system:  1)  listening  to  the  user's  console  and
interpreting input  in a special command  language; 2) controling the
compiler, starting it  and relaying  its error messages  back to  the
user; 3) signalling the loader when it is necessary to place compiled
code into the PDP-11; 4) handling the runtime interface to the PDP11.
Each of these modules is discussed below.

	The USER sits at a console and makes requests  of HAL.  These
fall  into  several categories:  Compilation,  loading, execution  of
programs, debugging of  code, requesting of status information,  asking
for immediate arm motion, saving and restoring the state of the world
at safe points, requesting explanation of certain compiler decisions.

	The  COMPILER reads HAL programs  from files (or, optionally,
directly from the  user's console)  and produces load  modules.   The
compiler is divided into three  phases: The PARSER, the EXPANDER, and
the TRAJECTORY CALCULATOR. The compiler is discussed in detail in
{ssref com}.

	The LOADER  takes the load  modules prepared by  the compiler
and  enters them into the  PDP11 runtime system.   Address relocation
and linking are done  at this time. The loader  also sets up the  data
area  in the  runtime interface  in  the PDP-10;  this data  includes
output  strings,  procedure linkages,   and information necessary for
diagnostic purposes  during  runtime.   Loading is  often  done in  a
partially  incremental  fashion,     installing  new  code  following
previously loaded code.  

	The RUNTIME  INTERFACE is charged with  initiating the PDP-11
program,  fielding procedure  calls from  the running HAL  program to
PDP-10   procedures,  returning   values   from   these   procedures,
and fetching values from the
PDP-11 for debugging purposes.
The interface has the power to interrupt the execution of the program
and to modify the status of the runtime system, for example, by
patching in additional program, or modifying the values of some
variables.  This allows the user to control her program through
the timesharing computer.

	The RUNTIME SYSTEM is the set of programs which reside in the
PDP11.    This system  includes  kernel programs  for  time-slice cpu
sharing and  process  control   and  a  set of  dynamically  created
processes.    These are  of  three  basic  types: a)  An  INTERPRETER
examines the tables prepared by the compiler and executes the numeric
computations  requested.   When  a  move  is  to  be  started,    the
interpreter sprouts a servo for  each joint and waits until all these
servos terminate.  b) A SERVO handles the motion of one moving joint.
c)  A   CONDITION-MONITOR  repeatedly  examines   certain  conditions
(whatever the programmer  has specified).  If it should discover that
its condition  is  satisfied,   it  sprouts  an interpreter  to  take
appropriate action.   

	There is a database in the runtime system which stores the
current values of all active variables and the attachment relations
between them.  Whenever an interpreter needs a value, it is fetched
through this database.

	Facilities also exist for control of the runtime system
by means of the PDP-11 console.  The features that are available
include inspection of the status of all active and dormant processes
and the values of all variables, as well as the insertion of breakpoints
and the ability to insert, delete, or modify code.

The runtime  system also includes  routines for
communication  with the (PDP-10)  runtime  interface.   The runtime  system is
described in detail in {secref run} and Appendix II.